package persist

import (
	"github.com/olivere/elastic/v7"
	"luiz/crawler/engine"
	"luiz/crawler/persist"
)

type ItemSaverService struct {
	Client *elastic.Client
	Index  string
}

func (a *ItemSaverService) Save(item engine.Item, result *string) error {
	err := persist.Save(a.Client, item, a.Index)
	return err
}
